# $Id$
# Maintainer: Antonio Rojas <arojas@archlinux.org>
# Maintainer: Felix Yan <felixonmars@archlinux.org>

pkgname=plasma-integration
pkgver=5.10.95
pkgrel=4
pkgdesc="Qt Platform Theme integration plugins for the Plasma workspaces"
arch=(i686 x86_64)
url='https://www.kde.org/workspaces/plasmadesktop/'
license=(LGPL)
depends=(kio kwayland libxcursor noto-fonts ttf-hack qqc2-desktop-style)
makedepends=(extra-cmake-modules python breeze)
groups=(plasma)
source=("https://download.kde.org/unstable/plasma/$pkgver/$pkgname-$pkgver.tar.xz"{,.sig}
        plasma-integration-qqc2-style.patch::"https://cgit.kde.org/plasma-integration.git/patch/?id=1781d60b"
        plasma-integration-qqc2-style-2.patch::"https://cgit.kde.org/plasma-integration.git/patch/?id=059369d6")
sha256sums=('783deac27011592cb364c4788e1854841ccb728b984fec01d48966b2e64831a4'
            'SKIP'
            '9106df5493e1f7a077aa976a8285efabb281126a7d76371d52ee2200150b9623'
            '0ab8adb056a468af0e206d29473f34e29666b8b70a0fe929bb26b7422af16d15')
validpgpkeys=('2D1D5B0588357787DE9EE225EC94D18F7F05997E'  # Jonathan Riddell
              '348C8651206633FD983A8FC4DEACEA00075E1D76'  # KDE Neon
              'D07BD8662C56CB291B316EB2F5675605C74E02CF') # David Edmundson

prepare() {
  mkdir -p build

  cd $pkgname-$pkgver
  patch -p1 -i ../plasma-integration-qqc2-style.patch # Set QQC2 style here
  patch -p1 -i ../plasma-integration-qqc2-style-2.patch
}

build() {
  cd build
  cmake ../$pkgname-$pkgver \
    -DCMAKE_BUILD_TYPE=Release \
    -DCMAKE_INSTALL_PREFIX=/usr \
    -DCMAKE_INSTALL_LIBDIR=lib \
    -DBUILD_TESTING=OFF
  make
}

package() {
  cd build
  make DESTDIR="$pkgdir" install
}
